﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="MassChange.aspx.vb" Inherits="MassChange" %>

<%@ Register Assembly="ISNet.WebUI.WebInput" Namespace="ISNet.WebUI.WebControls" TagPrefix="ISWebInput" %>

<%@ Register Assembly="ISNet.WebUI.WebTreeView" Namespace="ISNet.WebUI.WebTreeView" TagPrefix="ISWebTreeView" %>

<%@ Register Assembly="ISNet.WebUI.WebGrid" Namespace="ISNet.WebUI.WebGrid" TagPrefix="ISWebGrid" %>

<%@ Register Assembly="ISNet.WebUI.WebCombo" Namespace="ISNet.WebUI.WebCombo" TagPrefix="ISWebCombo" %>

<%@ Register Assembly="ISNet.WebUI.WebDesktop" Namespace="ISNet.WebUI.WebDesktop" TagPrefix="ISWebDesktop" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <link href="js/magicsuggest-1.2.6.css" rel="stylesheet" />
    <script src="js/magicsuggest-1.2.6.js"></script>
    <script src="script/packed.js"></script>
    <script src="script/tinybox.js"></script>

    <link href="script/style.css" rel="stylesheet" />
    <style>
        .WC4-DD-N {
            height: 0px;
        }

        .WC4-DD-A {
            height: 0px;
        }
    </style>
    <script type="text/javascript" src="js/JSON.js"></script>
    <script type="text/javascript">
        function openJS() { alert('loaded') }
        function closeJS() { doupdate() }
        function closeJS2() { doupdate() }
        function doupdate() {
            var grid = ISGetObject("WebGrid1");
            grid.ClearSelectedObject();
            grid.RootTable.UpdateUI();
            grid.RefreshAll();

        }

    </script>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div style="margin-left: 10px; padding: 10px 10px 10px 10px;">
        <div style="float: left; width: 97%; border: solid; border-color: gray; border-width: 1px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; box-shadow: 5px 5px 5px #808080; text-align: right; padding: 5px 5px 5px 5px;">
            <div style="text-align: right; margin-top: 5px;">
                <div align="left" style="width: 600px; float: left">
                    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                </div>

                ปี&nbsp;
            <asp:TextBox ID="PlanYearsTxt" runat="server" Width="50px" Enabled="false" Style="text-align: center;"></asp:TextBox>
                &nbsp;&nbsp;&nbsp;&nbsp;
            Version&nbsp;
            <asp:TextBox ID="VersionTxt" runat="server" Width="30px" Style="text-align: center" Text=""></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             
                <asp:ImageButton ID="SearhBtn" runat="server" ImageUrl="Icons/search.jpg" OnClientClick="clickedx()" ToolTip="แสดงรายการงบประมาณตามเงื่อนไขที่ระบุ" />
                <asp:ImageButton ID="TestBtn" runat="server" ImageUrl="Icons/TestMassChange.png" ToolTip="แสดงผลการเปลี่ยนแปลงตามเงื่อนไขที่ระบุ" />
                <asp:ImageButton ID="SaveBtn" runat="server" ImageUrl="Icons/SaveMassChange.png" ToolTip="บันทึกการเปลี่ยนแปลงตามเงื่อนไขที่ระบุ" OnClientClick=" return confirm('กรุณายืนยันการบันทึกการเปลี่ยนแปลง')" />

            </div>
        </div>
        <div>
            <div id="div1" runat="server" style="float: left; width: 50%; border: solid; border-color: gray; border-width: 1px; margin-right: 10px; margin-top: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; box-shadow: 5px 5px 5px #808080; height: 350px;">
                <div style="padding-bottom: 5px;"><strong>&nbsp;ข้อกำหนด</strong></div>
                <div style="padding-bottom: 5px; padding-left: 7px"><strong>&nbsp;FundCenter</strong> </div>
                <table width="100%">
                    <tr>
                        <td width="5px">&nbsp;</td>
                        <td>
                            <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Height="30px" Width="98%" EnableTheming="True">
                                <asp:TabPanel ID="TabPanel1" runat="server" HeaderText="ตั้งแต่ ถึง">
                                    <ContentTemplate>
                                        <table>
                                            <tr>
                                                <td>ตั้งแต่</td>
                                                <td>
                                                    <ISWebCombo:WebCombo ID="WebCombo1" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="FundCenterCode" Height="20px" OnInitializeDataSource="WebCombo1_InitializeDataSource" AdditionalSearchFields="FundCenterCode" AllowWildCardSearch="true">
                                                        <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                                        </LayoutSettings>
                                                        <Columns>
                                                            <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อ FundCenter" Width="250px" />
                                                            <ISWebCombo:WebComboColumn BaseFieldName="FundCenterCode" Name="FundCenterCode" HeaderText="รหัส FundCenter" Width="80px" />
                                                        </Columns>
                                                    </ISWebCombo:WebCombo>

                                                </td>
                                                <td>ถึง</td>
                                                <td>
                                                    <ISWebCombo:WebCombo ID="WebCombo2" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="FundCenterCode" Height="20px" OnInitializeDataSource="WebCombo2_InitializeDataSource" AdditionalSearchFields="FundCenterCode" AllowWildCardSearch="true">
                                                        <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                                        </LayoutSettings>
                                                        <Columns>
                                                            <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อ FundCenter" Width="250px" />
                                                            <ISWebCombo:WebComboColumn BaseFieldName="FundCenterCode" Name="FundCenterCode" HeaderText="รหัส FundCenter" Width="80px" />
                                                        </Columns>
                                                    </ISWebCombo:WebCombo>

                                                </td>
                                            </tr>
                                        </table>

                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="เลือกเอง">
                                    <ContentTemplate>
                                        <div style="margin-left: 10px; color: gray; font-size: 11px;">
                                            <asp:HiddenField runat="server" ID="hdf1" />
                                            <asp:ListBox ID="ms8" runat="server" Width="90%" SelectionMode="Multiple"></asp:ListBox><br />
                                            <script type="text/javascript">
                                                $(document).ready(function () {

                                                    var ms7 = $('#<%= ms8.ClientID%>').magicSuggest({
                                                        // will fetch data from options
                                                    });
                                                    var ms10 = $('#<%= ms9.ClientID%>').magicSuggest({
                                                    });

                                                    clickedx = function () {

                                                        $("#<%= hdf1.ClientId %>").val(ms7.getValue());
                                                        $("#<%= hdf2.ClientId %>").val(ms10.getValue());
                                                    }
                                                });
                                            </script>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                            </asp:TabContainer>

                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>

                            <div style="padding-bottom: 5px;"><strong>&nbsp;Commitment Item</strong></div>


                            <asp:TabContainer ID="TabContainer2" runat="server" ActiveTabIndex="0" Height="30px" Width="98%" EnableTheming="True">
                                <asp:TabPanel ID="TabPanel3" runat="server" HeaderText="ตั้งแต่ ถึง">
                                    <ContentTemplate>
                                        <table>
                                            <tr>
                                                <td>ตั้งแต่</td>
                                                <td>
                                                    <ISWebCombo:WebCombo ID="WebCombo3" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="CmmtCode" Height="20px" OnInitializeDataSource="WebCombo3_InitializeDataSource" AdditionalSearchFields="CmmtCode" AllowWildCardSearch="true">
                                                        <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                                        </LayoutSettings>
                                                        <Columns>
                                                            <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อ CommitmentItem" Width="250px" />
                                                            <ISWebCombo:WebComboColumn BaseFieldName="CmmtCode" Name="CmmtCode" HeaderText="รหัส CommitmentItem" Width="80px" />
                                                        </Columns>
                                                    </ISWebCombo:WebCombo>

                                                </td>
                                                <td>ถึง</td>
                                                <td>
                                                    <ISWebCombo:WebCombo ID="WebCombo4" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="CmmtCode" Height="20px" OnInitializeDataSource="WebCombo4_InitializeDataSource" AdditionalSearchFields="CmmtCode" AllowWildCardSearch="true">
                                                        <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                                        </LayoutSettings>
                                                        <Columns>
                                                            <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อ CommitmentItem" Width="250px" />
                                                            <ISWebCombo:WebComboColumn BaseFieldName="CmmtCode" Name="CmmtCode" HeaderText="รหัส CommitmentItem" Width="80px" />
                                                        </Columns>
                                                    </ISWebCombo:WebCombo>

                                                </td>
                                            </tr>
                                        </table>

                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="TabPanel4" runat="server" HeaderText="เลือกเอง">
                                    <ContentTemplate>
                                        <div style="margin-left: 10px; color: gray; font-size: 11px;">
                                            <asp:HiddenField runat="server" ID="hdf2" />
                                            <asp:ListBox ID="ms9" runat="server" Width="90%" SelectionMode="Multiple"></asp:ListBox><br />

                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                            </asp:TabContainer>
                        </td>
                    </tr>

                    <tr>
                        <td></td>
                        <td>

                            <div style="padding-bottom: 5px;"><strong>&nbsp;ข้อกำหนดเพิ่มเติม</strong></div>



                            <table>
                                <tr>
                                    <td width="50" align="left">โครงการ/งานสนับสนุน</td>
                                    <td>ตั้งแต่</td>
                                    <td>
                                        <ISWebCombo:WebCombo ID="ProjectCombo1" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="ProjectCode" Height="20px" OnInitializeDataSource="Project_InitializeDataSource" AdditionalSearchFields="ProjectCode" AllowWildCardSearch="true">
                                            <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                            </LayoutSettings>
                                            <Columns>
                                                <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อโครงการ/งานสนับสนุน" Width="250px" />
                                                <ISWebCombo:WebComboColumn BaseFieldName="ProjectCode" Name="FundCenterCode" HeaderText="รหัสโครงการ/งานสนับสนุน" Width="80px" />
                                            </Columns>
                                        </ISWebCombo:WebCombo>

                                    </td>
                                    <td>ถึง</td>
                                    <td>
                                        <ISWebCombo:WebCombo ID="ProjectCombo2" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="ProjectCode" Height="20px" OnInitializeDataSource="Project_InitializeDataSource" AdditionalSearchFields="ProjectCode" AllowWildCardSearch="true">
                                            <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                            </LayoutSettings>
                                            <Columns>
                                                <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อโครงการ/งานสนับสนุน" Width="250px" />
                                                <ISWebCombo:WebComboColumn BaseFieldName="ProjectCode" Name="FundCenterCode" HeaderText="รหัสโครงการ/งานสนับสนุน" Width="80px" />
                                            </Columns>
                                        </ISWebCombo:WebCombo>

                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">ครุภัณฑ์</td>
                                    <td>ตั้งแต่</td>
                                    <td>
                                        <ISWebCombo:WebCombo ID="ActTypeCombo1" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="ActivityTypeCode" Height="20px" OnInitializeDataSource="ActType_InitializeDataSource" AdditionalSearchFields="ActivityTypeCode" AllowWildCardSearch="true">
                                            <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                            </LayoutSettings>
                                            <Columns>
                                                <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อครุภัณฑ์" Width="250px" />
                                                <ISWebCombo:WebComboColumn BaseFieldName="ActivityTypeCode" Name="FundCenterCode" HeaderText="รหัสครุภัณฑ์" Width="80px" />
                                            </Columns>
                                        </ISWebCombo:WebCombo>

                                    </td>
                                    <td>ถึง</td>
                                    <td>
                                        <ISWebCombo:WebCombo ID="ActTypeCombo2" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="ActivityTypeCode" Height="20px" OnInitializeDataSource="ActType_InitializeDataSource" AdditionalSearchFields="ActivityTypeCode" AllowWildCardSearch="true">
                                            <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                            </LayoutSettings>
                                            <Columns>
                                                <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อครุภัณฑ์" Width="250px" />
                                                <ISWebCombo:WebComboColumn BaseFieldName="ActivityTypeCode" Name="FundCenterCode" HeaderText="รหัสครุภัณฑ์" Width="80px" />
                                            </Columns>
                                        </ISWebCombo:WebCombo>

                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">ผลิตภัณฑ์</td>
                                    <td>ตั้งแต่</td>
                                    <td>
                                        <ISWebCombo:WebCombo ID="ProductCombo1" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="ProductCode" Height="20px" OnInitializeDataSource="Product_InitializeDataSource" AdditionalSearchFields="ProductCode" AllowWildCardSearch="true">
                                            <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                            </LayoutSettings>
                                            <Columns>
                                                <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อผลิตภัณฑ์" Width="250px" />
                                                <ISWebCombo:WebComboColumn BaseFieldName="ProductCode" Name="ProductCode" HeaderText="รหัสผลิตภัณฑ์" Width="80px" />
                                            </Columns>
                                        </ISWebCombo:WebCombo>

                                    </td>
                                    <td>ถึง</td>

                                    <td>
                                        <ISWebCombo:WebCombo ID="ProductCombo2" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="ProductCode" Height="20px" OnInitializeDataSource="Product_InitializeDataSource" AdditionalSearchFields="ProductCode" AllowWildCardSearch="true">
                                            <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                            </LayoutSettings>
                                            <Columns>
                                                <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อผลิตภัณฑ์" Width="250px" />
                                                <ISWebCombo:WebComboColumn BaseFieldName="ProductCode" Name="ProductCode" HeaderText="รหัสผลิตภัณฑ์" Width="80px" />
                                            </Columns>
                                        </ISWebCombo:WebCombo>

                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">กิจกรรม</td>
                                    <td>ตั้งแต่</td>
                                    <td>
                                        <ISWebCombo:WebCombo ID="ActivityCombo1" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="ActivityCode" Height="20px" OnInitializeDataSource="Activity_InitializeDataSource" AdditionalSearchFields="ActivityCode" AllowWildCardSearch="true">
                                            <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                            </LayoutSettings>
                                            <Columns>
                                                <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อกิจกรรม" Width="250px" />
                                                <ISWebCombo:WebComboColumn BaseFieldName="ActivityCode" Name="ActivityCode" HeaderText="รหัสกิจกรรม" Width="80px" />
                                            </Columns>
                                        </ISWebCombo:WebCombo>

                                    </td>
                                    <td>ถึง</td>
                                    <td>
                                        <ISWebCombo:WebCombo ID="ActivityCombo2" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="ActivityCode" Height="20px" OnInitializeDataSource="Activity_InitializeDataSource" AdditionalSearchFields="ActivityCode" AllowWildCardSearch="true">
                                            <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                            </LayoutSettings>
                                            <Columns>
                                                <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อกิจกรรม" Width="250px" />
                                                <ISWebCombo:WebComboColumn BaseFieldName="ActivityCode" Name="ActivityCode" HeaderText="รหัสกิจกรรม" Width="80px" />
                                            </Columns>
                                        </ISWebCombo:WebCombo>

                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                </table>


            </div>
            <div id="div2" runat="server" style="float: right; width: 45%; border: solid; border-color: gray; border-width: 1px; margin-right: 30px; margin-top: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; box-shadow: 5px 5px 5px #808080; height: 150px;">
                <div style="padding-bottom: 5px; padding-left: 7px"><strong>&nbsp;การเปลี่ยนแปลง</strong> </div>
                <table width="100%">
                    <tr>
                        <td width="5px">&nbsp;</td>
                        <td>
                            <asp:TabContainer ID="TabContainer3" runat="server" ActiveTabIndex="0" Height="30px" Width="98%" EnableTheming="True">
                                <asp:TabPanel ID="TabPanel5" runat="server" HeaderText="เปลี่ยนค่า">
                                    <ContentTemplate>
                                        <table>
                                            <tr>
                                                <td>เปลี่ยนค่า</td>
                                                <td>
                                                    <ISWebCombo:WebCombo ID="ItemCombo" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="RecType" Height="20px" OnInitializeDataSource="Item_InitializeDataSource">
                                                        <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false">
                                                        </LayoutSettings>
                                                    </ISWebCombo:WebCombo>
                                                </td>
                                                <td>&nbsp;เป็น&nbsp;</td>
                                                <td>
                                                    <ISWebCombo:WebCombo ID="ItemListCombo" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="Code" Height="20px" OnInitializeDataSource="ItemList_InitializeDataSource" AdditionalSearchFields="Code" AllowWildCardSearch="true">
                                                        <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" ComboMode="MultipleColumns">
                                                            <TextSettings ParentEmptyPromptText="กรุณาเลือกประเภทค่าที่ต้องการเปลี่ยน" />
                                                        </LayoutSettings>
                                                        <Columns>
                                                            <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อ" Width="250px" />
                                                            <ISWebCombo:WebComboColumn BaseFieldName="Code" Name="Code" HeaderText="รหัส" Width="80px" />
                                                        </Columns>
                                                        <LinkSettings Enabled="True" ParentWebComboID="ItemCombo" />
                                                    </ISWebCombo:WebCombo>
                                                </td>
                                            </tr>
                                        </table>

                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="TabPanel6" runat="server" HeaderText="เปลี่่ยนจำนวนเงิน">
                                    <ContentTemplate>
                                        <table>
                                            <tr>
                                                <td>เปลี่ยนจำนวนเงิน</td>
                                                <td>
                                                    <ISWebCombo:WebCombo ID="AmountChangeCombo" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="RecType" Height="20px" OnInitializeDataSource="AmountChange_InitializeDataSource">
                                                        <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false">
                                                        </LayoutSettings>
                                                    </ISWebCombo:WebCombo>
                                                </td>
                                                <td>&nbsp;เป็น&nbsp;</td>
                                                <td><%--<ISWebInput:WebInput runat="server" ID="AmountChangeTextBox" Width="100px" NumericInput="true" Height="20px" MaxLength="10">
                             
                                        <DisplayFormat Format="#,###,###,###" IsEnabled="True" Type="Number">
                                        </DisplayFormat>
                                    </ISWebInput:WebInput>--%>
                                                    <asp:TextBox ID="AmountChangeTextBox" runat="server" Width="100px"></asp:TextBox>&nbsp;บาท / %</td>
                                            </tr>
                                        </table>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="TabPanel7" runat="server" HeaderText="เปลี่่ยนราคาต่อหน่วย">
                                    <ContentTemplate>
                                        <table>
                                            <tr>
                                                <td>เปลี่ยนราคาต่อหน่วย</td>
                                                <td>
                                                    <ISWebCombo:WebCombo ID="UnitPriceChangeCombo" Width="200px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="RecType" Height="20px" OnInitializeDataSource="AmountChange_InitializeDataSource">
                                                        <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false">
                                                        </LayoutSettings>
                                                    </ISWebCombo:WebCombo>
                                                </td>
                                                <td>&nbsp;เป็น&nbsp;</td>
                                                <td><%--<ISWebInput:WebInput runat="server" ID="UnitPriceChangeTextBox" Width="100px" NumericInput="true" Height="20px" MaxLength="10">
                             
                                        <DisplayFormat Format="#,###,###,###" IsEnabled="True" Type="Number">
                                        </DisplayFormat>
                                    </ISWebInput:WebInput>--%>
                                                    <asp:TextBox ID="UnitPriceChangeTextBox" runat="server" Width="100px"></asp:TextBox>&nbsp; บาท / %</td>
                                            </tr>
                                        </table>
                                    </ContentTemplate>
                                </asp:TabPanel>
                            </asp:TabContainer>
                        </td>
                    </tr>
                </table>
            </div>


            <div style="float: left; width: 97%; border: solid; border-color: gray; border-width: 1px; margin-top: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; box-shadow: 5px 5px 5px #808080; padding: 5px 5px 5px 5px;">

                <div style="padding-bottom: 5px;"><strong>รายการงบประมาณ</strong></div>
                <ISWebGrid:WebGrid ID="WebGrid1" runat="server" UseDefaultStyle="True" Width="100%" DefaultStyleMode="Silver" Height="350px">
                    <LayoutSettings AllowAddNew="No" EditOnClick="False" AllowColumnMove="No"
                        AllowEdit="No" AllowDelete="No" AllowSorting="Yes" ColumnFooters="Yes"
                        InProgressUIBehavior="ChangeCursorToHourGlass"
                        AlwaysShowHelpButton="false" PagingMode="ClassicPaging" PagingSize="10"
                        VirtualLoadMode="LargeData" VirtualPageSize="10" PagingLoadMode="Automatic">
                        <RowStyle Font-Names="Tahoma" Font-Size="9" CustomRules="overflow: hidden;" />
                        <AlternatingRowStyle Font-Names="Tahoma" Font-Size="9" BackColor="#fbfbfb" CustomRules="overflow: hidden;" />

                    </LayoutSettings>
                    <RootTable DataKeyField="Id">
                        <Columns>

                            <ISWebGrid:WebGridColumn Caption="Fund Center" Name="FundCenter" DataMember="FundCenter_FundCenterCode" Width="150px">
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Left" />
                                <ValueList DataTextField="Description" DataSourceID="FctDataSource"
                                    DataValueField="FundCenterCode">
                                </ValueList>
                            </ISWebGrid:WebGridColumn>
                            <ISWebGrid:WebGridColumn Name="Cmmt" Width="150px" Caption="Commitment Item" DataMember="CmmtCode">
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Left" />
                                <ValueList DataTextField="Description" DataSourceID="CmmtDataSource"
                                    DataValueField="CmmtCode">
                                </ValueList>
                            </ISWebGrid:WebGridColumn>
                            <ISWebGrid:WebGridColumn Name="ActivityType" Width="150px" Caption="ครุภัณฑ์" DataMember="ActivityTypeCode">
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Left" />
                                <ValueList DataTextField="Description" DataSourceID="ActivityTypeDataSource"
                                    DataValueField="ActivityTypeCode">
                                </ValueList>
                            </ISWebGrid:WebGridColumn>
                            <ISWebGrid:WebGridColumn Name="Product" Width="150px" Caption="ผลิตภัณฑ์" DataMember="ProductCode">
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Left" />
                                <ValueList DataTextField="Description" DataSourceID="PorductDataSource"
                                    DataValueField="ProductCode">
                                </ValueList>
                            </ISWebGrid:WebGridColumn>
                            <ISWebGrid:WebGridColumn Name="Project" Width="150px" Caption="โครงการ/งานสนับสนุน" DataMember="Project_ProjectCode">
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Left" />
                                <ValueList DataTextField="Description" DataSourceID="ProjectDataSource"
                                    DataValueField="Project_ProjectCode">
                                </ValueList>
                            </ISWebGrid:WebGridColumn>
                            <ISWebGrid:WebGridColumn Name="Activity" Width="150px" Caption="กิจกรรม" DataMember="Activity_ActivityCode">
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Left" />
                                <ValueList DataTextField="Description" DataSourceID="ActivityDataSource"
                                    DataValueField="ActivityCode">
                                </ValueList>
                            </ISWebGrid:WebGridColumn>
                            <ISWebGrid:WebGridColumn Name="NewQuantity" Width="80px" Caption="เพิ่ม" DataMember="NewQuantity" ColumnType="Template">
                                <CellTemplate>
                                    <asp:Label ID="CurrentValue" runat="server" Text='<%# bind("NewQuantity") %>' ForeColor="black" />
                                    <asp:Label ID="Sign" runat="server" Text='/' ForeColor="Black" Visible="false" />
                                    <asp:Label ID="ChangeValue" runat="server" Text='' ForeColor="Red" Visible="false" />
                                </CellTemplate>
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Right" />
                            </ISWebGrid:WebGridColumn>
                            <ISWebGrid:WebGridColumn Name="ReplaceQuantity" Width="80px" Caption="ทดแทน" DataMember="ReplaceQuantity" ColumnType="Template">
                                <CellTemplate>
                                    <asp:Label ID="CurrentValue" runat="server" Text='<%# bind("ReplaceQuantity") %>' ForeColor="black" />
                                    <asp:Label ID="Sign" runat="server" Text='/' ForeColor="Black" Visible="false" />
                                    <asp:Label ID="ChangeValue" runat="server" Text='' ForeColor="Red" Visible="false" />
                                </CellTemplate>
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Right" />
                            </ISWebGrid:WebGridColumn>

                            <ISWebGrid:WebGridColumn Name="PricePerUnit" Width="120px" Caption="ราคาต่อหน่วย" DataMember="PricePerUnit" ColumnType="Template">
                            
                                <CellTemplate>
                                    <asp:Label ID="CurrentValue" runat="server" Text='<%# Bind("PricePerUnit")%>' ForeColor="black" />
                                    <asp:Label ID="Sign" runat="server" Text='/' ForeColor="Black" Visible="false" />
                                    <asp:Label ID="ChangeValue" runat="server" Text='' ForeColor="Red" Visible="false" />
                                </CellTemplate>
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Right" />
                            </ISWebGrid:WebGridColumn>
                            <ISWebGrid:WebGridColumn Name="Amount" Width="120px" Caption="จำนวนเงิน" DataMember="Amount" DataFormatString="##,##0" AggregateFunction="Sum">
                               
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Right" />
                            </ISWebGrid:WebGridColumn>
                            <ISWebGrid:WebGridColumn Name="AlterAmount" Width="120px" Caption="จำนวนเงินที่ปรับเปลี่ยน"  DataFormatString="##,##0" AggregateFunction="Sum">
                                
                                <HeaderStyle HorizontalAlign="Center" />
                                <CellStyle HorizontalAlign="Right" />
                            </ISWebGrid:WebGridColumn>
                        </Columns>
                    </RootTable>

                </ISWebGrid:WebGrid>

                <asp:ObjectDataSource ID="ProjectDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="BasicDataTableAdapters.Project_ValueTableAdapter">
                    <SelectParameters>
                        <asp:SessionParameter Name="PlanYear" SessionField="PlanYear" Type="Int16" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="FctDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MassChangeDSTableAdapters.FundCentersTableAdapter">

                    <SelectParameters>
                        <asp:SessionParameter Name="planyear" SessionField="PlanYear" Type="Int16" />
                    </SelectParameters>

                </asp:ObjectDataSource>

                <asp:ObjectDataSource ID="CmmtDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MassChangeDSTableAdapters.CmmtsTableAdapter">



                    <SelectParameters>
                        <asp:SessionParameter Name="planyear" SessionField="PlanYear" Type="Int16" />
                    </SelectParameters>



                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="ActivityTypeDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MassChangeDSTableAdapters.ActivityTypesTableAdapter" DeleteMethod="Delete" InsertMethod="Insert" UpdateMethod="Update">



                    <SelectParameters>
                        <asp:SessionParameter Name="planyear" SessionField="PlanYear" Type="Int16" />
                    </SelectParameters>



                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="PorductDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MassChangeDSTableAdapters.ProductsTableAdapter">

                    <SelectParameters>
                        <asp:SessionParameter Name="planyear" SessionField="PlanYear" Type="Int16" />
                    </SelectParameters>

                </asp:ObjectDataSource>

                <asp:ObjectDataSource ID="ActivityDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MassChangeDSTableAdapters.ActivitiesTableAdapter">

                    <SelectParameters>
                        <asp:SessionParameter Name="planyear" SessionField="PlanYear" Type="Int16" />
                    </SelectParameters>

                </asp:ObjectDataSource>
            </div>
        </div>
    </div>
    <%=scripttext %>
</asp:Content>

